package com.kgc.est.controller;

import com.kgc.est.feignService.ClassifyService;
import com.kgc.est.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "首页接口")
@RestController
@RequestMapping("/api/home")
public class HomeController {

    @Autowired
    private ClassifyService classifyService;

    @ApiOperation(value = "获取商品类别树的接口")
    @GetMapping("/classifyTree")
    public Result classifyTree(){

        return classifyService.getClassifyTree();
    }

}
